import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import commonjs from 'vite-plugin-commonjs';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [commonjs(),react()],
  build: {
	  commonjsOptions: {
	    transformMixedEsModules: true
	  }
  },
  server: {
    host: 'localhost',
    port: 8080,
    proxy: {
      '/api': {
        target: 'https://api.aonet.ai/', 
        changeOrigin: true,
      },
    },
  }
})
